package com.liu.efk.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVo implements Serializable {


    private long code ;
    private String message;
    private  Object data;


    public ResultVo(long code, String message) {
        this.code = code;
        this.message = message;
    }

    public static ResultVo success(){

       return  new ResultVo(20000,"sucesss");
   }
    public static ResultVo success(String message){

        return  new ResultVo(20000,message);
    }
    public static ResultVo success(String message,Object obj){

        return  new ResultVo(20000,message,obj);
    }
    public static ResultVo success(Object obj){

        return  new ResultVo(20000,"sucesss",obj);
    }

    public static ResultVo faild(Object obj){

        return  new ResultVo(50000,"faild",obj);
    }
    public static ResultVo faild(){

        return  new ResultVo(50000,"faild");
    }






}
